DRUID Data Service Installation

DRUID Data Service is DRUID’s data storage used to persist DRUID entity records created and managed within the DRUID Platform simplifying records authoring. Bot authors can further use these records in NER training and in other different contexts.

This document describes how to install DRUID Data Service on your premises.

The following tokens used within this document are supposed to be replaced with their real values before being used:

Token

Description

{{DRUID-CONNECTOR}}

The machine which hosts DRUID Connector Host service.

{{DATASERVICE-SERVER}}¹

The machine which hosts DRUID Data Service. It can be the same machine that hosts DRUID Connector Host service as long as all requirements are fulfilled.

{{DATASERVICE-PORT}}

The TCP port on which Druid DRUID Data Service will be accessed.

{{TENANT-NAME}}

Your tenant name assigned by DRUID team.

Prerequisites

  • Your tenant is already configured in Hybrid mode deployment.
  • Make a request to Druid Tech Support to activate the DRUID Data Service feature.
    • You will provide your tenant identifier, {{TENANT-NAME}}.

Hardware requirements

Item

Testing Environment

Production Environment

CPU count

1

2

CPU Type

Proc Intel i7 gen 8 min or equivalent Xeon.

 

RAM

4 GB

8 GB

Storage Type

Min 500 IOPS.

 

Software requirements

Tool

Install instructions

Type

Notepad ++

https://notepad-plus-plus.org/downloads/

Recommended

Mongo DB

https://www.mongodb.com/docs/manual/tutorial/#installation

Mandatory

By default, MongoDB is installed without any secured access, which means that the database can be viewed or modified by anyone who has network access to the machine running the MongoDB service. To set up security for your MongoDB installation, see Configure secured access to your MongoDB database.

Networking requirements

Source

Destination

Protocol Port

Function

Used at

{{DRUID-CONNECTOR}}

{{DATASERVICE-SERVER}}

https

http

{{DATASERVICE- PORT}}

Feature DataService

Utilization

{{DATASERVICE-SERVER}}

{{MONGODB-INSTANCE}}

tcp

27017

Data persistence

DRUID

Utilization

{{DATASERVICE-SERVER}}

{{TENANT-NAME}}.druidplatform.com

https

443

Platform stored in Azure

Utilization

This section describes how to install DRUID Data Service using the Connector Host installer kit.

Step 1: Download DRUID Connector Host Installer

On the {{DATASERVICE-SERVER}} machine, download the DRUID Connector Host Installer:

  1. Access the Druid ChatBot Portal using an admin account and from the left menu select AllSettings >  Download binaries. The Connector and Data Service tab appears by default.
  2. Download the latest version.

The file is downloaded as zip in your default download folder.

Step 2: Unzip the downloaded file

Usually, the URL security zone might prevent the downloaded file execution. Right-click on the file and click Properties, untick the Read-only checkbox, click Apply, confirm the changes and then click OK. Unzip the downloaded file into the installation folder, e.g. D:\Druid.

Step 3. Install Druid Data Service

Go to the folder DRUID Connector installer and double-click on Druid.ConnectorHost.Installer.exe.

The installation wizard opens. Select Data Service.

Note:  Selecting both options will install the Data Service and the Connector Host on the same machine.

Click Next.

Select Install a new Data Service instance.

Hint:   Using the DRUID Connector Host installer, you can also upgrade or uninstall versions of DRUID Data Service installed using the installer.

Click Next.

Provide DRUID Data Service installation parameters or import the settings by clicking the Import settings button and uploading the appsettings.json file from an older DRUID Data Service installation folder.

Parameter

Description

Example

Data Service
Instance name The name of the Data Service instance test-DS
Installation folder The link of the folder where the Data Service will be installed. E:\Druid\DataService_test-DS
Connections

MongoDB

 

The connection string to the MongoDB database.

mongodb://localhost:27017/

Druid Portal API

URL

The DRUID AI platform url.

https://{{environment

}}.druidplatform.com/

 

Tenant The name of your DRUID AI Platform tenant assigned by the DRUID team. documentation

Username

 

A dedicated DRUID Portal user ( in your tenant) with Druid Backend API permissions. We recommend you to use the same credential as the one used for DRUID Connector Host installation.

 

Password

 

The password of the dedicated DRUID Portal user.

 
Configurations

Local port number

The http port for communicating with Data Service.

5105

 

Query ResultSet Max Limit The maximum number of records that can be transmitted through DRUID Data Service. We recommend you to set the value to minimum 100.000. 100000
Service settings
Local System / User account

The credentials of the Windows user under which the Data Service will run.

 
Client Rate Limiting  
Period/Limit

Control the rate of requests sent to DRUID Data service to prevent DDOS attacks. We recommend you to leave the default limits.

 

Click Next, then click Start.

After the Data Service installation completes, click Exit.

Step 3. Enable DRUID Data Service in DRUID Portal

In DRUID Portal, on the Administration menu, click Settings, click the DRUID Data Service tab and tick on Is enabled.

Note:   DRUID will scan all existing entities across all bots on your tenant and detects the entities that have fields for which the field type is incompatible with the required system field type. You can go through the list and click on entity (entities) to see which field types were found incompatible.


Note:  The following DRUID system fields are automatically populated on entity and entity field creation; therefore, DRUID requires a specific field type:

DRUID System Field

DRUID field Type

Id

Guid

CreatedByUserId

Guid

CreatedOn

DateTime

ModifiedByUserId

String

ModifiedOn

DateTime

OperatedByBotId

String

  • Click the Overwrite entity fields button at the bottom of the pop-up to overwrite your existing field types to the ones required by DRUID.
  • At the top-right corner of the page, click the Save all button ().
  • Configure secured access to your MongoDB database

    Note:  If your MongoDB instance is hosted on a different machine than the one running DRUID Data Service, you must open the MongoDB port by running the following command in an elevated command prompt of your MongoDB Windows Server machine:
    Copy
    netsh advfirewall firewall add rule name="Open mongod port 27017" dir=in action=allow protocol=TCP localport=27017

    To configure security in MongoDB you can use mongosh or compass.

    This section describes how to configure security in MongoDB using the compass tool:

    1. Access compass and click the Connect button
    2. At the left-bottom of the Compass window, click on >_MONGOSH.
    3. Change the database to admin by typing use admin and pressing ENTER.
    4. Create the user by typing the text below and replacing {{MONGOADMIN}} and {{MONGOPASS}} with the MongoDB credentials (user and password).
    5. Note:  For credentials, use only alphanumeric characters.
      Copy
      db.createUser(
       { user: "{{MONGOADMIN}}",
         pwd: "{{MONGOPASS}}",
         roles: [
            { role: "userAdminAnyDatabase", db: "admin" },
            { role: "readWriteAnyDatabase", db: "admin" }
         ]
       }
      )
    6. Press ENTER. The response must be { ok: 1 }.
    7. Edit the file C:\Program Files\MongoDB\Server\6.0\bin\mongod.cfg by setting up the following configuration.
    8. Copy
      security: authorization: enabled
       
      net:
      port: 27017
      bindIp: 127.0.0.1,{{HOST-NAME}}
      Note:  Change {{HOST-NAME}} with the name of the Windows computer which runs the MongoDB service.
    9. Restart the MongoDB service.

    To connect to MongoDB, the new connection string is:

    Copy
    mongodb://{{MONGOADMIN}}:{{MONGOPASS}}@localhost:27017

    For example, mongodb://druid-mongo-admin:TLb2DDPKuhVr5ZYU@localhost:27017.